package com.handsome.适配器模式.spring源码;

import org.springframework.web.servlet.ModelAndView;

/**
 * @author niechun
 * @date 2023/2/2 21:58
 */
public class SimpleControllerHandleAdapter implements HandleAdapter{
    @Override
    public boolean supports(Object handler) {

        return handler instanceof SimpleController;
    }

    @Override
    public ModelAndView handle(Object handler) {
        SimpleController  result=  (SimpleController)handler;
        return result.handleRequest();
    }
}
